package com.dxy.product.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dxy.common.pojo.Product;
import com.dxy.product.mapper.ProductMapper;
import com.dxy.product.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements ProductService {

    @Autowired
    private ProductMapper productMapper;

    @Override
    public int reduceStock(String productId, int num) {
        return productMapper.reduceStock(productId, num);
    }
}
